package com.starlink.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.starlink.model.request.PointsAcquireBillRequest;
import com.starlink.model.vo.PointsAcquireBillVO;
import com.starlink.model.vo.PointsVO;
import org.springframework.data.domain.Pageable;
import com.starlink.model.domain.PointsUseBillDO;
import com.starlink.model.request.PointsUseBillRequest;
import com.starlink.model.vo.PointsUseBillVO;

/**
 * @author zhanghong
 */
public interface PointsService extends IService<PointsUseBillDO> {



    /**
     * 消费积分
     */
    void consumPoint(PointsUseBillRequest request);

    /**
     * 积分获取明细分页查询
     * @param pageable
     * @param request
     * @return
     */
    PageInfo<PointsAcquireBillVO> pageQueryPointsAcquireBill(Pageable pageable, PointsAcquireBillRequest request);

    /**
     * 积分使用明细分页查询
     * @return
     */
    PageInfo<PointsUseBillVO> pageQueryPointsUseBill(Pageable pageable, PointsUseBillRequest request);

    /**
     * 查询积分信息
     * @param userId
     * @return
     */
    PointsVO selectPointInfo(Long userId);

    /**
     * 积分增加
     * @param request
     * @return
     */
    Boolean addPoint(PointsAcquireBillRequest request);
}
